Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add ~ alias to fixture #1533

Closed
wants to merge 2 commits into from
Closed

test: add ~ alias to fixture #1533

wants to merge 2 commits into from

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In working on #1532, I noticed we have an api route that uses an alias that doesn't exist.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the chore label Aug 4, 2023
@danielroe danielroe requested a review from pi0 August 4, 2023 16:12
@danielroe danielroe self-assigned this Aug 4, 2023
@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #1533 (b386a6f) into main (451d314) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1533   +/-   ##
=======================================
  Coverage   76.25%   76.25%           
=======================================
  Files          73       73           
  Lines        7478     7478           
  Branches      734      734           
=======================================
  Hits         5702     5702           
  Misses       1775     1775           
  Partials        1        1           

@pi0
Copy link
Member

pi0 commented Aug 4, 2023

It is strange that ~ is not working... (will double check locally)

@pi0
Copy link
Member

pi0 commented Aug 6, 2023

Alias exists

https://github.com/unjs/nitro/blob/1e134c1f05f5bd646ef209c929ccc5db2cf5c881/src/rollup/config.ts#L331

Creating testfixture/routes/index.ts:

export { default } from "~/routes/modules";

pnpm nitro dev test/fixture works! (but types are broken).

@pi0 pi0 closed this Aug 6, 2023
@pi0 pi0 deleted the test/fixture branch August 6, 2023 18:25
@danielroe
Copy link
Member Author

the issue is that we don't resolve aliases in writing types. I have resolved the issue in the type PR.

@Aareksio Aareksio mentioned this pull request Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants